package com.yanqu.road.entity.activity.seacraft;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import com.yanqu.road.entity.DataStatus;

/**
 * @Description 海上争霸之南海丝路 联盟船只信息
 * @Author cwq
 * @Data 2022/1/20 11:21
 */
@FieldTypeAnnotation(tableName = "t_c_activity_seacraft_southsea_union_ship")
public class SeacraftSouthSeaCrossUnionShipData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id",select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "联盟id",select = true, update = true)
    private String unionId;
    @FieldTypeAnnotation(desc = "总的耐久")
    private long totalDurable;
    @FieldTypeAnnotation(desc = "剩余耐久")
    private long remainDurable;
    @FieldTypeAnnotation(desc = "上次修理时间 ms")
    private long fixRefreshTime;
    @FieldTypeAnnotation(desc = "当前正在加速记录")
    private List<SeacraftSouthSeaCurSpeedInfo> speedRecordList = new CopyOnWriteArrayList<>();
    @FieldTypeAnnotation(desc = "已经行驶的路程")
    private long distance;
    @FieldTypeAnnotation(desc = "上次刷新路程的时间  ms")
    private long refreshTime;
    @FieldTypeAnnotation(desc = "到达终点的时间  ms")
    private long endTime;


    public int getActivityId() {
        return activityId;
    }
    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public String getUnionId() {
        return unionId;
    }
    public void setUnionId(String unionId) {
        if (unionId == null){
            return;
        }
        if (this.unionId == null || !this.unionId.equals(unionId)) {
            this.unionId = unionId;
            setOp(DataStatus.Update);
        }
    }

    public long getTotalDurable() {
        return totalDurable;
    }
    public void setTotalDurable(long totalDurable) {
        if (this.totalDurable != totalDurable) {
            this.totalDurable = totalDurable;
            setOp(DataStatus.Update);
        }
    }

    public long getRemainDurable() {
        return remainDurable;
    }
    public void setRemainDurable(long remainDurable) {
        if (this.remainDurable != remainDurable) {
            this.remainDurable = remainDurable;
            setOp(DataStatus.Update);
        }
    }

    public long getFixRefreshTime() {
        return fixRefreshTime;
    }

    public void setFixRefreshTime(long fixRefreshTime) {
        if (this.fixRefreshTime != fixRefreshTime) {
            this.fixRefreshTime = fixRefreshTime;
            setOp(DataStatus.Update);
        }
    }

    public List<SeacraftSouthSeaCurSpeedInfo> getSpeedRecordList() {
        return speedRecordList;
    }

    public void setSpeedRecordList(List<SeacraftSouthSeaCurSpeedInfo> speedRecordList) {
        if (null == speedRecordList){
            return;
        }
        if (this.speedRecordList == null || !this.speedRecordList.equals(speedRecordList)) {
            this.speedRecordList = speedRecordList;
            setOp(DataStatus.Update);
        }
    }

    public long getDistance() {
        return distance;
    }
    public void setDistance(long distance) {
        if (this.distance != distance) {
            this.distance = distance;
            setOp(DataStatus.Update);
        }
    }

    public long getRefreshTime() {
        return refreshTime;
    }
    public void setRefreshTime(long refreshTime) {
        if (this.refreshTime != refreshTime) {
            this.refreshTime = refreshTime;
            setOp(DataStatus.Update);
        }
    }

    public long getEndTime() {
        return endTime;
    }
    public void setEndTime(long endTime) {
        if (this.endTime != endTime) {
            this.endTime = endTime;
            setOp(DataStatus.Update);
        }
    }
}
